package com.leyou.common.exception;




import com.leyou.common.enums.ExceptionEnum;
import lombok.Getter;
/*
* ExceptionEnum-->LyException为了参数传递
* */
@Getter
public class LyException extends RuntimeException {
    private int status;

    public LyException(ExceptionEnum em) {
        super(em.getMessage());
        this.status = em.getStatus();
    }
public LyException(int status,String message){
        super(message);
        this.status=status;
}
    public LyException(ExceptionEnum em, Throwable cause) {
        super(em.getMessage(), cause);
        this.status = em.getStatus();
    }
}
